package site.assad.aspectj.example;

import org.aspectj.lang.annotation.Aspect;
import org.aspectj.lang.annotation.DeclareParents;
import site.assad.common.NaiveSeller;
import site.assad.common.Seller;

/**
 * Author: Al-assad 余林颖
 * E-mail: yulinying_1994@outlook.com
 * Date: 2017/12/5 20:56
 * Description: @DeclareParents 引介增强切面类，将NaiveWaiter引介增强Seller的接口方法
 */
@Aspect
public class EnableSellerAspect {

    @DeclareParents(value = "site.assad.common.NaiveWaiter",  //为 NaiveWaiter 添加接口实现
                    defaultImpl = NaiveSeller.class)     //默认的接口实现类
    public Seller seller;  //引介增强要实现的接口

}
